//
//  LMTextView.m
//  舍品
//
//  Created by 楼 眉 on 16/2/23.
//  Copyright © 2016年 楼 眉. All rights reserved.
//

#import "LMTextView.h"
@interface LMTextView ()
@property (nonatomic,strong)  UIButton *leftBtn;
@property (nonatomic,strong)  UIButton *rightBtn;
@end
@implementation LMTextView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self  = [super initWithFrame:frame]) {
        UIButton *leftBtn = [[UIButton alloc]init];
        [leftBtn setTitle:@"拖动" forState:UIControlStateNormal];
        self.leftBtn = leftBtn;
        [self addSubview:leftBtn];
        
        UIButton *rightBtn = [[UIButton alloc]init];
        [rightBtn setTitle:@"删除" forState:UIControlStateNormal];
        self.rightBtn = rightBtn;
        [self addSubview:rightBtn];
    }
    return self;
}

- (void)layoutSubviews
{
    self.inputView.frame = CGRectMake(0, 0, 100, 50);
    
    self.leftBtn.frame = CGRectMake(0, CGRectGetMaxY(self.inputView.frame), 50, 33);

    self.leftBtn.backgroundColor = LMRandomColor;
}

@end
